import request from '@/utils/request'

// 查询角色和水管机构关联列表
export function listSysRoleOrgan(query) {
  return request({
    url: '/system/SysRoleOrgan/list',
    method: 'get',
    params: query
  })
}

// 查询角色和水管机构关联详细
export function getSysRoleOrgan(roleId) {
  return request({
    url: '/system/SysRoleOrgan/' + roleId,
    method: 'get'
  })
}

// 新增角色和水管机构关联
export function addSysRoleOrgan(data) {
  return request({
    url: '/system/SysRoleOrgan',
    method: 'post',
    data: data
  })
}

// 修改角色和水管机构关联
export function updateSysRoleOrgan(data) {
  return request({
    url: '/system/SysRoleOrgan',
    method: 'put',
    data: data
  })
}

// 删除角色和水管机构关联
export function delSysRoleOrgan(roleId) {
  return request({
    url: '/system/SysRoleOrgan/' + roleId,
    method: 'delete'
  })
}
